package com.study.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 用户消息
 * </p>
 *
 * @author flwu
 * @since 2020-03-20
 */
@TableName("tbl_user_message")
public class UserMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 消息ID
     */
    private Long messageId;

    /**
     * 是否已读[0：否；1：是]
     */
    private Boolean isRead;

    /**
     * 是否删除，0：否；1：是
     */
    private Boolean isDelete;

    /**
     * 创建时间
     */
    private LocalDateTime createDatetime;

    /**
     * 最后更新时间
     */
    private LocalDateTime updateDatetime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Long getMessageId() {
        return messageId;
    }

    public void setMessageId(Long messageId) {
        this.messageId = messageId;
    }
    public Boolean getRead() {
        return isRead;
    }

    public void setRead(Boolean isRead) {
        this.isRead = isRead;
    }
    public Boolean getDelete() {
        return isDelete;
    }

    public void setDelete(Boolean isDelete) {
        this.isDelete = isDelete;
    }
    public LocalDateTime getCreateDatetime() {
        return createDatetime;
    }

    public void setCreateDatetime(LocalDateTime createDatetime) {
        this.createDatetime = createDatetime;
    }
    public LocalDateTime getUpdateDatetime() {
        return updateDatetime;
    }

    public void setUpdateDatetime(LocalDateTime updateDatetime) {
        this.updateDatetime = updateDatetime;
    }

    @Override
    public String toString() {
        return "UserMessage{" +
            "id=" + id +
            ", userId=" + userId +
            ", messageId=" + messageId +
            ", isRead=" + isRead +
            ", isDelete=" + isDelete +
            ", createDatetime=" + createDatetime +
            ", updateDatetime=" + updateDatetime +
        "}";
    }
}
